﻿@page "/RazorPage/NewProductApply/EmailTemplate/{formid:int?}"
@model RndMaterialDisposalService.Pages.EmailTemplates.NewProductApply.IndexModel
@{
    Layout = "~/Pages/Shared/_EmailLayout.cshtml";
    int idx = 0;
    var ERPDeviceInfoList = Model.FormData?.ERPDeviceInfo ?? new List<RndMaterialDisposalService.Models.Entitys.ProductModelDto>();
}

<table style="width: 100%; border-spacing: 0; border-collapse: collapse; font-family: 宋体; font-size: 10pt;">
    <tr style="background-color: #B8B8B8; color: black; font-size: 11pt; font-weight: bold;">
        <td colspan="4">申请信息</td>
    </tr>
    <tr>
        <td style="font-weight: Bold;width: 20%;">填表人:</td>
        <td style="width: 30%;">@Model.FormData?.Applicant</td>
        <td style="font-weight: Bold;width: 20%;">填表时间:</td>
        <td style="width: 30%;">@Model.FormData?.ApplicantDate?.ToString("yyyy-MM-dd HH:mm")</td>
    </tr>
    <tr>
        <td style="font-weight: Bold;width: 20%;">联系电话:</td>
        <td style="width: 30%;">@Model.FormData?.Mobile</td>
        <td style="font-weight: Bold;width: 20%;">产品线:</td>
        <td style="width: 30%;">@Model.FormData?.DeptName</td>
    </tr>
    <tr>
        <td style="font-weight: Bold;width: 20%;">项目名称:</td>
        <td style="width: 30%;">@Model.FormData?.ProjectName</td>
        <td style="font-weight: Bold;width: 20%;">项目编码:</td>
        <td style="width: 30%;">@Model.FormData?.ProjectCode</td>

    </tr>
    <tr>
        <td style="font-weight: Bold;width: 20%;">验证地点:</td>
        <td style="width: 30%;">@Model.FormData?.ProductAddress</td>
        <td style="font-weight: Bold;width: 20%;">开发地点:</td>
        <td style="width: 30%;">@Model.FormData?.DevelopAddress</td>
    </tr>

    <tr>
        <td style="font-weight: Bold;width: 20%;">产品对内型号:</td>
        <td colspan="3">@string.Join(",",Model.FormData?.ProductModelReamrk??new List<string>())</td>
    </tr>

    <tr>
        <td style="font-weight: Bold;width: 20%;">物料计划工程师:</td>
        <td style="width: 30%;">@Model.FormData?.MaterialPlanTracker</td>
        <td style="font-weight: Bold;width: 20%;">中试计划工程师:</td>
        <td style="width: 30%;">@Model.FormData?.PlanningDepartment</td>
    </tr>
    <tr>
        <td style="font-weight: Bold;width: 20%;">试制经理:</td>
        <td style="width: 30%;">@Model.FormData?.TestingDepartment</td>
        <td style="font-weight: Bold;width: 20%;">数据中心审批人:</td>
        <td style="width: 30%;">@Model.FormData?.DataCenter</td>
    </tr>
    <tr>
        <td style="font-weight: Bold;width: 20%;">试制工程师:</td>
        <td style="width: 30%;">@Model.FormData?.TrialManufactureEngineer</td>
        <td style="font-weight: Bold;width: 20%;">项目经理:</td>
        <td style="width: 30%;">@Model.FormData?.ProjectManagerNoteID</td>
    </tr>
    <tr>
        <td style="font-weight: Bold;width: 20%;">电子工艺工程师:</td>
        <td style="width: 30%;">@Model.FormData?.ElectronicEngineer</td>
        <td style="font-weight: Bold;width: 20%;">硬件工程师:</td>
        <td style="width: 30%;">@Model.FormData?.HardwareEngineer</td>
    </tr>
    <tr>

        <td style="font-weight: Bold;width: 20%;">软件工程师:</td>
        <td style="width: 30%;">@Model.FormData?.SoftwareEngineer</td>
        <td style="font-weight: Bold;width: 20%;">装备工程师:</td>
        <td style="width: 30%;">@Model.FormData?.EquipmentEngineer</td>
    </tr>
    <tr>
        <td style="font-weight: Bold;width: 20%;">结构工程师(整机工艺):</td>
        <td style="width: 30%;">@Model.FormData?.StructuralEngineer</td>
        <td style="font-weight: Bold;width: 20%;">项目管理工程师:</td>
        <td style="width: 30%;">@Model.FormData?.ProjectManagementEngineer</td>
    </tr>
    <tr>
        <td style="font-weight: Bold;width: 20%;">预计正样评审(内部验收):</td>
        <td style="width: 30%;">@Model.FormData?.AcceptanceDate?.ToString("yyyy-MM-dd")</td>
        <td style="font-weight: Bold;width: 20%;"></td>
        <td style="width: 30%;"></td>
    </tr>

    <tr>
        <td style="font-weight: Bold;width: 20%;">关键器件可互换性清单:</td>
        <td colspan="3">@Model.FormData?.RemarkChecklist1</td>
    </tr>
    <tr>
        <td style="font-weight: Bold;width: 20%;">安规器件清单:</td>
        <td colspan="3">@Model.FormData?.RemarkChecklist2</td>
    </tr>
    <tr>
        <td style="font-weight: Bold;width: 20%;">单板工装夹具、专用包材、钢网、拼板信息:</td>
        <td colspan="3">@Model.FormData?.RemarkChecklist3</td>
    </tr>
    <tr>
        <td style="font-weight: Bold;width: 20%;">工装清单明细表:</td>
        <td colspan="3">@Model.FormData?.RemarkChecklist4</td>
    </tr>
    <tr>
        <td style="font-weight: Bold;width: 20%;">中试产品发货必须要完成的安规认证种类:</td>
        <td colspan="3">@Model.FormData?.RemarkChecklist5</td>
    </tr>
    <tr>
        <td style="font-weight: Bold;width: 20%;">关键器件开发备料表:</td>
        <td colspan="3">@Model.FormData?.RemarkChecklist6</td>
    </tr>
    <tr>
        <td style="font-weight: Bold;width: 20%;">企标录入(附件):</td>
        <td colspan="3">@Model.FormData?.RemarkChecklist7</td>
    </tr>

    <tr style="background-color: #B8B8B8; color: black; font-size: 11pt; font-weight: bold;">
        <td colspan="4">中试验证需求预测</td>
    </tr>
    @foreach (var item in ERPDeviceInfoList)
    {
        <tr>
            <td style="font-weight: Bold;width: 20%;">【# @(idx += 1)】 描述:</td>
            <td colspan="3">@item.Describe</td>
        </tr>
        <tr>
            <td style="font-weight: Bold;width: 20%;">BOM编码:</td>
            <td style="width: 30%;">@item.ItemID</td>
            <td style="font-weight: Bold;width: 20%;">第一批:</td>
            <td style="width: 30%;">@item.BatchNum1</td>
        </tr>
        <tr>
            <td style="font-weight: Bold;width: 20%;">第二批:</td>
            <td style="width: 30%;">@item.BatchNum2</td>
            <td style="font-weight: Bold;width: 20%;">第三批:</td>
            <td style="width: 30%;">@item.BatchNum3</td>
        </tr>
    }
</table>